import request from '@/utils/request'

// 获取数据列表
export function getTableList(data) {
  return request({
    url: '/zt/major/list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'post',
    data: data
  })
}

// 新增专业
export function addSpeciality(data) {
  return request({
    url: '/zt/major/saveBatch',
    method: 'post',
    data: data
  })
}

// 获取专业详情信息
export function getDetailById(query) {
  return request({
    url: '/zt/major/findById',
    method: 'get',
    params: query
  })
}

// 修改专业
export function updateSpeciality(data) {
  return request({
    url: '/zt/major/update',
    method: 'put',
    data: data
  })
}

// 删除专业
export function deleteSpeciality(query) {
  return request({
    url: '/zt/major/delete',
    method: 'delete',
    params: query
  })
}

// 获取专业树
export function getZyTree(query) {
  return request({
    url: '/zt/major/tree',
    method: 'get',
    params: query
  })
}
